package com.qf.smsplatform.pojo;


public class TDirtyword implements CheckNull{

  private Long id;
  private String dirtyword;
  private Long owntype;
  private Long creater;


  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }


  public String getDirtyword() {
    return dirtyword;
  }

  public void setDirtyword(String dirtyword) {
    this.dirtyword = dirtyword;
  }


  public Long getOwntype() {
    return owntype;
  }

  public void setOwntype(Long owntype) {
    this.owntype = owntype;
  }


  public Long getCreater() {
    return creater;
  }

  public void setCreater(Long creater) {
    this.creater = creater;
  }


  @Override
  public boolean isNull(CheckType type) {
    switch (type){
      case DELETE:
        return id==null;
      case UPDATE:
        return dirtyword==""||dirtyword==null;
      case ADD:
        return dirtyword.equals("")||dirtyword==null;
    }
    return false;
  }
}
